<?php defined('SYSPATH') or die('No direct script access.');

/*
 * change color theme
 */

class Controller_Theme extends Controller_Initialize {

  public $auto_render = false;

  public function action_index($name) {
    $color = array('default', 'red');
    if(in_array($name, $color)) {
      Cookie::set('theme', $name);
      echo Cookie::get('theme');
      Request::instance()->redirect('/');
    } else {
      Message::add('warning', 'Změny nebyli provedeny.');
      Request::instance()->redirect('/');
    }
  }


 } // End